package com.youths.service;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.youths.domain.Task;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: KingRainGrey
 * Date: 2020/7/14
 */
public interface TaskService {
    int addTask(Task task);

    int updateTaskState(Integer expertId, Integer state, Integer taskId);

    int querySliceId(Integer taskId);
    int queryTaskId(Integer slicingId);
    int updateState(Integer state, Integer taskId);

    List<Task> getByState(Integer state);

    List<Task> queryByExpert(Integer expertId);

    List<Task> getAll(Task task);

    Integer getTotal(Integer state, Integer expertId);

    List<Task> getRecords(Task task);

    Integer getRecordNum(Integer expertId);

    PageInfo getTaskList(Integer pageNum,Integer pageSize, Integer slicingId, Integer expertId, String card, String name, Integer state, String order);

    JSONObject taskDistribution(Integer expertId, String taskId);

    JSONObject cancelTask(String taskId);
}
